package communication.exception;

public class RepeatCommandException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5585710336256664912L;
	private String description;
	private VerifyParameterException ex=null;
	
	public RepeatCommandException(String string) {
		this.description=string;
	}
	public RepeatCommandException(String string, VerifyParameterException e) {
		this.description=string;
		this.ex=e;
	}
	public String toString(){
		StringBuilder prt;
		if(this.ex==null)
			return this.description;
		else{
			prt=new StringBuilder(255);
			prt.append(this.description);
			for(String field:ex.getField()){
				prt.append(" #");
				prt.append(field);
			}
			return prt.toString();
		}
	}

}
